﻿@using PerpetuumSoft.Knockout
@using TimeProject.WebSite.Views;

@model TimeProject.WebSite.ViewModels.ChangePasswordViewModel
@{
    var ko = Html.CreateKnockoutContext();
}

@using (ko.With(m => m.Messages))
{
    @Html.GetInfoBox(Model.Messages)
}

<div class="page-header">
    <h1>CHANGE PASSWORD <small>Change my password.</small></h1>
</div>

<form class="form-horizontal">
    <div class="well">        
        <div class="row-fluid">
            <div class="span6">
                <div class="control-group">
                    <div class="control-label">
                        @Html.GetLabel(x => x.OldPassword)
                    </div>
                    <div class="controls">
                        @ko.Html.GetPasswordTextBox(x => x.OldPassword)
                    </div>
                </div>

                <div class="control-group">
                    <div class="control-label">
                        @Html.GetLabel(x => x.NewPassword)
                    </div>
                    <div class="controls">
                        @ko.Html.GetPasswordTextBox(x => x.NewPassword)
                    </div>
                </div>

                <div class="control-group">
                    <div class="control-label">
                        @Html.GetLabel(x => x.ConfirmNewPassword)
                    </div>
                    <div class="controls">
                        @ko.Html.GetPasswordTextBox(x => x.ConfirmNewPassword)
                    </div>
                </div>
            </div>

            <div class="span6">
                 @Html.GetHelpText("Please note that you will be automatically logged off after you change the password!")
            </div>
        </div>
    </div>

    @Html.GetFixedBackLink("MyAccount")
    @ko.Html.GetButtonRight("Change", "ChangePassword")
    @ko.Init(Model)
</form>